package com.eling.elcms.travel.service.impl;

import com.eling.elcms.core.service.impl.GenericManagerImpl;
import com.eling.elcms.travel.dao.IOrganizationSettlementDao;
import com.eling.elcms.travel.model.OrganizationSettlement;
import com.eling.elcms.travel.model.view.OrganizationSettlementView;
import com.eling.elcms.travel.service.IOrganizationSettlementManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class OrganizationSettlementManagerImpl extends GenericManagerImpl<OrganizationSettlement,Long> 
				implements IOrganizationSettlementManager{
	
	IOrganizationSettlementDao organizationSettlementDao;
	
	@Autowired
	public void setOrganizationSettlementDao(IOrganizationSettlementDao dao) {
		this.dao = dao;
		this.organizationSettlementDao = dao;
	}

	@Override
	public List<OrganizationSettlementView> queryByService(Date startDate, Date endDate, Long pkOrganization) {
		return organizationSettlementDao.queryByService(startDate,endDate,pkOrganization);
	}
	
	@Override
	public List<OrganizationSettlementView> queryByAccount(Long pkOrganization, String status, Date startDate,
			Date endDate) {
		return  organizationSettlementDao.queryByAccount(pkOrganization,  status,  startDate,  endDate);
	}
}
